PBL Group 21
Loading...
Searching...
No Matches
Alpha Blender Application Documentation

Introduction

This is the User Manual for Alpha Blender. The user can measure overlap data and apply transparency masks to projected content, though Alpha Blender has some conditions that depend on external devices and specific environmental configurations. Alpha Blender visualizes data obtained from physical projector measurements and records the data for further usage in multi-projector setting. This User Manual is divided into the following sections:

System Architecture and Logic

The application is built on a modular Python architecture designed for high-performance image manipulation using the OpenCV library. The system is divided into two primary components:

  1. MainAlphaBlender: This is the main controller class for performing the alpha-blending. It handles image processing, overlap estimation, and the application of the spatially smooth alpha mask.
  2. ConfigReader: This helper class reads and provides configuration values for the alpha-blending system. It loads a JSON configuration file and exposes accessor methods that return typed values for physical projector parameters and runtime options.

Mathematical Foundation

The program applies gamma-corrected alpha blending to overlapping projector images to avoid visible seams. Standard linear blending often results in "hotspots" or dark bands because projectors do not have a linear luminance response.

Example of Latex: The Pythagorian logic of image blending uses the Gamma Correction equation ( \( M(x) = B(x)^{1/\gamma} \)) which was proved to compensate for projector luminance behavior.

In this formula:

  • \( M(x) \) is the calculated mask value.
  • \( B(x) \) is the linear ramp value (0 to 1).
  • \( \gamma \) is the gamma value, typically 2.4, which is crucial for projector luminance compensation.

Visualization of Blending Process

Below is the visualization of the data processing process. To create an alpha mask, the program identifies the overlap region and applies the calculated curve to the alpha channel.

Before Mask Application

The following images represent the raw projector inputs. Without the alpha mask, the overlapping region where these two images meet would appear significantly brighter than the rest of the display.

Left Output Right Output
Left Image: Gamma-Corrected Fade Right Image: Gamma-Corrected Fade

After Mask Application

The following images show the result of the MainAlphaBlender execution. The transparency has been adjusted based on the side parameter—"left" or "right"—defined in the configuration.

Left Output Right Output
Left Image: Gamma-Corrected Fade Right Image: Gamma-Corrected Fade

Configuration and Usage

The ConfigReader module parses config.json to determine the overlap pixels based on the physical width of the projected image and the distance between the projector lenses. If the physical width is 200cm and the distance is 150cm, the software calculates an overlap ratio of approximately 16.6%.

  • Projected Width: The width of one projector's image in centimeters.
  • Distance: The physical distance between projector lenses.
  • Side: The side this instance represents, either "left" or "right".
  • Gamma: The correction value used to raise the curve to power (1/gamma).
Note
To avoid confusion, our project requires you to manually split the image into left and right. The value we used for gamma is 2.4.